<!DOCTYPE html>
<html lang="en">

<!-- Head tag -->
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="google-site-verification" content="xBT4GhYoi5qRD5tr338pgPM5OWHHIDR6mNg1a3euekI" />
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta name="description" content="android mio4kon mio">
    <meta name="keyword"  content="">
    <link rel="shortcut icon" href="/img/favicon.ico">

    <title>
        
          Android wiki - Mio4kon的博客 | Mio4kon&#39;s Blog
        
    </title>

    <link rel="canonical" href="http://mio4kon.com/2014/12/01/Wiki/">

    <!-- Bootstrap Core CSS -->
    <link rel="stylesheet" href="/css/bootstrap.min.css">

    <!-- Custom CSS -->
    <link rel="stylesheet" href="/css/hux-blog.min.css">

    <!-- Pygments Highlight CSS -->
    <link rel="stylesheet" href="/css/highlight.css">

    <!-- Custom Fonts -->
    <!-- <link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.3.0/css/font-awesome.min.css" rel="stylesheet" type="text/css"> -->
    <!-- Hux change font-awesome CDN to qiniu -->
    <link href="https://cdn.staticfile.org/font-awesome/4.5.0/css/font-awesome.min.css" rel="stylesheet" type="text/css">


    <!-- Hux Delete, sad but pending in China
    <link href='http://fonts.googleapis.com/css?family=Lora:400,700,400italic,700italic' rel='stylesheet' type='text/css'>
    <link href='http://fonts.googleapis.com/css?family=Open+Sans:300italic,400italic,600italic,700italic,800italic,400,300,600,700,800' rel='stylesheet' type='text/
    css'>
    -->


    <!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
    <!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
    <!--[if lt IE 9]>
        <script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
        <script src="https://oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js"></script>
    <![endif]-->

    <!-- ga & ba script hoook -->
    <script></script>
</head>


<!-- hack iOS CSS :active style -->
<body ontouchstart="">

    <!-- Navigation -->
<nav class="navbar navbar-default navbar-custom navbar-fixed-top">
    <div class="container-fluid">
        <!-- Brand and toggle get grouped for better mobile display -->
        <div class="navbar-header page-scroll">
            <button type="button" class="navbar-toggle">
                <span class="sr-only">Toggle navigation</span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
                <span class="icon-bar"></span>
            </button>
            <a class="navbar-brand" href="/">Mio4kon</a>
        </div>

        <!-- Collect the nav links, forms, and other content for toggling -->
        <!-- Known Issue, found by Hux:
            <nav>'s height woule be hold on by its content.
            so, when navbar scale out, the <nav> will cover tags.
            also mask any touch event of tags, unfortunately.
        -->
        <div id="huxblog_navbar">
            <div class="navbar-collapse">
                <ul class="nav navbar-nav navbar-right">
                    <li>
                        <a href="/">Home</a>
                    </li>

                    

                        
                    

                        
                        <li>
                            <a href="/about/">About</a>
                        </li>
                        
                    

                        
                        <li>
                            <a href="/archives/">Archives</a>
                        </li>
                        
                    

                        
                        <li>
                            <a href="/tags/">Tags</a>
                        </li>
                        
                    
                    
                </ul>
            </div>
        </div>
        <!-- /.navbar-collapse -->
    </div>
    <!-- /.container -->
</nav>
<script>
    // Drop Bootstarp low-performance Navbar
    // Use customize navbar with high-quality material design animation
    // in high-perf jank-free CSS3 implementation
    var $body   = document.body;
    var $toggle = document.querySelector('.navbar-toggle');
    var $navbar = document.querySelector('#huxblog_navbar');
    var $collapse = document.querySelector('.navbar-collapse');

    $toggle.addEventListener('click', handleMagic)
    function handleMagic(e){
        if ($navbar.className.indexOf('in') > 0) {
        // CLOSE
            $navbar.className = " ";
            // wait until animation end.
            setTimeout(function(){
                // prevent frequently toggle
                if($navbar.className.indexOf('in') < 0) {
                    $collapse.style.height = "0px"
                }
            },400)
        }else{
        // OPEN
            $collapse.style.height = "auto"
            $navbar.className += " in";
        }
    }
</script>


    <!-- Main Content -->
    
<!-- Image to hack wechat -->
<!-- <img src="http://mio4kon.com/img/icon_wechat.png" width="0" height="0"> -->
<!-- <img src="{{ site.baseurl }}/{% if page.header-img %}{{ page.header-img }}{% else %}{{ site.header-img }}{% endif %}" width="0" height="0"> -->

<!-- Post Header -->
<style type="text/css">
    header.intro-header{
        background-image: url('/img/home-bg.jpg')
    }
</style>
<header class="intro-header" >
    <div class="container">
        <div class="row">
            <div class="col-lg-8 col-lg-offset-2 col-md-10 col-md-offset-1">
                <div class="post-heading">
                    <div class="tags">
                        
                          <a class="tag" href="/tags/#WIKI" title="WIKI">WIKI</a>
                        
                    </div>
                    <h1>Android wiki</h1>
                    <h2 class="subheading"></h2>
                    <span class="meta">
                        Posted by Mio4kon on
                        2014-12-01
                    </span>
                </div>
            </div>
        </div>
    </div>
</header>

<!-- Post Content -->
<article>
    <div class="container">
        <div class="row">

    <!-- Post Container -->
            <div class="
                col-lg-8 col-lg-offset-2
                col-md-10 col-md-offset-1
                post-container">

                <h1 id="Wiki"><a href="#Wiki" class="headerlink" title="Wiki"></a>Wiki</h1><p>不定时更新(<del>深坑,太监</del>)</p>
<h2 id="Paint"><a href="#Paint" class="headerlink" title="Paint"></a>Paint</h2><p><strong>抗锯齿</strong><br><code>Paint paint = new Paint (Paint.ANTI_ALIAS_FLAG);</code><br><strong>只画边框</strong><br><code>paint.setStyle(Paint.Style.STROKE);</code> </p>
<h2 id="Canvas"><a href="#Canvas" class="headerlink" title="Canvas"></a>Canvas</h2><p><strong>translate</strong></p>
<p>移动原点，默认的原点(0,0)是在屏幕左上角的,通过translate（x，y）把点（x，y）作为原点.<br><code>canvas.translate(float dx, float dy)</code>  </p>
<p><strong>布局完成的回调</strong></p>
<figure class="highlight java"><table><tr><td class="gutter"><pre><div class="line">1</div><div class="line">2</div><div class="line">3</div><div class="line">4</div><div class="line">5</div><div class="line">6</div><div class="line">7</div><div class="line">8</div></pre></td><td class="code"><pre><div class="line">mSbv.getViewTreeObserver().addOnGlobalLayoutListener(</div><div class="line">              <span class="keyword">new</span> ViewTreeObserver.OnGlobalLayoutListener () &#123;</div><div class="line">                  <span class="meta">@Override</span></div><div class="line">                  <span class="function"><span class="keyword">public</span> <span class="keyword">void</span> <span class="title">onGlobalLayout</span><span class="params">()</span> </span>&#123;</div><div class="line">                  </div><div class="line">                      mSbv.getViewTreeObserver().removeGlobalOnLayoutListener (<span class="keyword">this</span>);</div><div class="line">                  &#125;</div><div class="line">              &#125;);</div></pre></td></tr></table></figure>
<a id="more"></a>
<h2 id="Cliping"><a href="#Cliping" class="headerlink" title="Cliping"></a>Cliping</h2><p><img src="http://mio4kon.qiniudn.com/cliping.jpg" alt=""></p>
<figure class="highlight java"><table><tr><td class="gutter"><pre><div class="line">1</div><div class="line">2</div><div class="line">3</div><div class="line">4</div><div class="line">5</div><div class="line">6</div><div class="line">7</div><div class="line">8</div><div class="line">9</div><div class="line">10</div><div class="line">11</div><div class="line">12</div><div class="line">13</div><div class="line">14</div><div class="line">15</div><div class="line">16</div><div class="line">17</div><div class="line">18</div><div class="line">19</div><div class="line">20</div><div class="line">21</div><div class="line">22</div><div class="line">23</div><div class="line">24</div><div class="line">25</div><div class="line">26</div><div class="line">27</div><div class="line">28</div><div class="line">29</div><div class="line">30</div><div class="line">31</div><div class="line">32</div><div class="line">33</div><div class="line">34</div><div class="line">35</div><div class="line">36</div><div class="line">37</div><div class="line">38</div><div class="line">39</div><div class="line">40</div><div class="line">41</div><div class="line">42</div><div class="line">43</div><div class="line">44</div><div class="line">45</div><div class="line">46</div><div class="line">47</div><div class="line">48</div><div class="line">49</div><div class="line">50</div><div class="line">51</div><div class="line">52</div><div class="line">53</div><div class="line">54</div><div class="line">55</div><div class="line">56</div><div class="line">57</div><div class="line">58</div><div class="line">59</div></pre></td><td class="code"><pre><div class="line"><span class="function"><span class="keyword">private</span> <span class="keyword">void</span> <span class="title">drawScene</span><span class="params">(Canvas canvas)</span> </span>&#123;</div><div class="line">         canvas.clipRect(<span class="number">0</span>, <span class="number">0</span>, <span class="number">100</span>, <span class="number">100</span>);</div><div class="line"></div><div class="line">         canvas.drawColor(Color.WHITE);</div><div class="line"></div><div class="line">         mPaint.setColor(Color.RED);</div><div class="line">         canvas.drawLine(<span class="number">0</span>, <span class="number">0</span>, <span class="number">100</span>, <span class="number">100</span>, mPaint);</div><div class="line"></div><div class="line">         mPaint.setColor(Color.GREEN);</div><div class="line">         canvas.drawCircle(<span class="number">30</span>, <span class="number">70</span>, <span class="number">30</span>, mPaint);</div><div class="line"></div><div class="line">         mPaint.setColor(Color.BLUE);</div><div class="line">         canvas.drawText(<span class="string">"Clipping"</span>, <span class="number">100</span>, <span class="number">30</span>, mPaint);</div><div class="line">     &#125;</div><div class="line"></div><div class="line">     <span class="meta">@Override</span> <span class="function"><span class="keyword">protected</span> <span class="keyword">void</span> <span class="title">onDraw</span><span class="params">(Canvas canvas)</span> </span>&#123;</div><div class="line">         canvas.drawColor(Color.GRAY);</div><div class="line">         canvas.save();</div><div class="line">         canvas.translate(<span class="number">10</span>, <span class="number">10</span>);</div><div class="line">         drawScene(canvas);</div><div class="line">         canvas.restore();</div><div class="line"></div><div class="line">         canvas.save();</div><div class="line">         canvas.translate(<span class="number">160</span>, <span class="number">10</span>);</div><div class="line">         canvas.clipRect(<span class="number">10</span>, <span class="number">10</span>, <span class="number">90</span>, <span class="number">90</span>);</div><div class="line">         canvas.clipRect(<span class="number">30</span>, <span class="number">30</span>, <span class="number">70</span>, <span class="number">70</span>, Region.Op.DIFFERENCE);<span class="comment">//DIFFERENCE第一次不同于第二次的部分显示出来</span></div><div class="line">         drawScene(canvas);</div><div class="line">         canvas.restore();</div><div class="line"></div><div class="line">         canvas.save();</div><div class="line">         canvas.translate(<span class="number">10</span>, <span class="number">160</span>);</div><div class="line">         mPath.reset();</div><div class="line">         canvas.clipPath(mPath); <span class="comment">// makes the clip empty</span></div><div class="line">         mPath.addCircle(<span class="number">50</span>, <span class="number">50</span>, <span class="number">50</span>, Path.Direction.CCW);<span class="comment">//逆时针</span></div><div class="line">         canvas.clipPath(mPath, Region.Op.REPLACE); <span class="comment">//REPLACE显示第二次的</span></div><div class="line">         drawScene(canvas);</div><div class="line">         canvas.restore();</div><div class="line"></div><div class="line">         canvas.save();</div><div class="line">         canvas.translate(<span class="number">160</span>, <span class="number">160</span>);</div><div class="line">         canvas.clipRect(<span class="number">0</span>, <span class="number">0</span>, <span class="number">60</span>, <span class="number">60</span>);</div><div class="line">         canvas.clipRect(<span class="number">40</span>, <span class="number">40</span>, <span class="number">100</span>, <span class="number">100</span>, Region.Op.UNION);<span class="comment">//全部显示</span></div><div class="line">         drawScene(canvas);</div><div class="line">         canvas.restore();</div><div class="line"></div><div class="line">         canvas.save();</div><div class="line">         canvas.translate(<span class="number">10</span>, <span class="number">310</span>);</div><div class="line">         canvas.clipRect(<span class="number">0</span>, <span class="number">0</span>, <span class="number">60</span>, <span class="number">60</span>);</div><div class="line">         canvas.clipRect(<span class="number">40</span>, <span class="number">40</span>, <span class="number">100</span>, <span class="number">100</span>, Region.Op.XOR);<span class="comment">//就是全集的减去交集生育部分显示</span></div><div class="line">         drawScene(canvas);</div><div class="line">         canvas.restore();</div><div class="line"></div><div class="line">         canvas.save();</div><div class="line">         canvas.translate(<span class="number">160</span>, <span class="number">310</span>);</div><div class="line">         canvas.clipRect(<span class="number">0</span>, <span class="number">0</span>, <span class="number">60</span>, <span class="number">60</span>);</div><div class="line">         canvas.clipRect(<span class="number">40</span>, <span class="number">40</span>, <span class="number">100</span>, <span class="number">100</span>, Region.Op.REVERSE_DIFFERENCE); <span class="comment">//第二次不同于第一次的部分显示 </span></div><div class="line">         drawScene(canvas);</div><div class="line">         canvas.restore();</div><div class="line">     &#125;</div></pre></td></tr></table></figure>
<h2 id="Animation"><a href="#Animation" class="headerlink" title="Animation"></a>Animation</h2><p><strong>自定义动画效果</strong></p>
<ol>
<li>重写Animation <code>applyTransformation (float interpolatedTime, Transformation t)</code>  </li>
<li>重写Animation <code>initialize (int width, int height, int parentWidth, int parentHeight)</code>  </li>
</ol>
<p><em>tips:</em><br>1.绘制动画的过程中会反复的调用applyTransformation 函数，每次调用参数interpolatedTime值都会变化，该参数从0渐变为1，当该参数为1时表明动画结束。</p>
<ol>
<li>通过参数Transformation 来获取变换的矩阵（matrix），通过改变矩阵就可以实现各种复杂的效果.  </li>
<li>initialize,这是一个回调函数告诉Animation目标View的大小参数，在这里可以初始化一些相关的参数，例如设置动画持续时间、设置Interpolator、设置动画的参考点等。  </li>
</ol>
<p><strong>插值器</strong></p>
<p><code>AccelerateDecelerateInterpolator 在动画开始与结束的地方速率改变比较慢，在中间的时候加速</code><br><code>AccelerateInterpolator  在动画开始的地方速率改变比较慢，然后开始加速</code><br><code>AnticipateInterpolator 开始的时候向后然后向前甩</code><br><code>AnticipateOvershootInterpolator 开始的时候向后然后向前甩一定值后返回最后的值</code><br><code>BounceInterpolator   动画结束的时候弹起</code><br><code>CycleInterpolator 动画循环播放特定的次数，速率改变沿着正弦曲线</code><br><code>DecelerateInterpolator 在动画开始的地方快然后慢</code><br><code>LinearInterpolator   以常量速率改变</code><br><code>OvershootInterpolator    向前甩一定值后再回到原来位置</code></p>
<h2 id="Nineoldandroids-APIs"><a href="#Nineoldandroids-APIs" class="headerlink" title="Nineoldandroids APIs"></a>Nineoldandroids APIs</h2><p><strong>垂直移动</strong>  </p>
<p><code>ObjectAnimator anmi1 = ObjectAnimator.ofFloat (iv, &quot;y&quot;, 0f, 500).setDuration (500);</code></p>
<p><strong>复制动画 </strong> </p>
<p><code>ObjectAnimator anmi2 = anmi1.clone ();</code><br><strong>动画合集</strong></p>
<p><code>AnimatorSet anmiSet1 = new AnimatorSet ();</code><br><code>anmiSet1.playSequentially (anmi1,anmi2);</code></p>
<p><strong>addUpdateListener使用</strong></p>
<figure class="highlight java"><table><tr><td class="gutter"><pre><div class="line">1</div><div class="line">2</div><div class="line">3</div><div class="line">4</div><div class="line">5</div><div class="line">6</div><div class="line">7</div><div class="line">8</div></pre></td><td class="code"><pre><div class="line">ObjectAnimator anmi1 = ObjectAnimator.ofFloat (iv, <span class="string">"ss"</span>, <span class="number">0f</span>, <span class="number">1f</span>).setDuration (<span class="number">10000</span>);</div><div class="line">       anmi1.addUpdateListener (<span class="keyword">new</span> ValueAnimator.AnimatorUpdateListener () &#123;</div><div class="line">           <span class="meta">@Override</span></div><div class="line">           <span class="function"><span class="keyword">public</span> <span class="keyword">void</span> <span class="title">onAnimationUpdate</span><span class="params">(ValueAnimator animation)</span> </span>&#123;</div><div class="line">               Float v = (Float) animation.getAnimatedValue ();</div><div class="line">               iv.setAlpha (v);</div><div class="line">           &#125;</div><div class="line">       &#125;);</div></pre></td></tr></table></figure>
<p><strong>颜色渐变</strong></p>
<pre><code>ValueAnimator colorAnim = ObjectAnimator.ofInt(iv, &quot;backgroundColor&quot;, /*Red*/0xFFFF8080, /    *Blue*/0xFF8080FF);
   colorAnim.setDuration(3000);
   colorAnim.setEvaluator(new ArgbEvaluator ());
   colorAnim.setRepeatCount(ValueAnimator.INFINITE);
   colorAnim.setRepeatMode(ValueAnimator.REVERSE);
   colorAnim.start();
</code></pre><p><strong>属性</strong> </p>
<p>rotationX | rotationY | rotation | translationX | translationY | scaleX | scaleY | alpha</p>
<h2 id="获取通知栏高度"><a href="#获取通知栏高度" class="headerlink" title="获取通知栏高度"></a>获取通知栏高度</h2><figure class="highlight java"><table><tr><td class="gutter"><pre><div class="line">1</div><div class="line">2</div><div class="line">3</div><div class="line">4</div><div class="line">5</div><div class="line">6</div><div class="line">7</div><div class="line">8</div><div class="line">9</div><div class="line">10</div><div class="line">11</div><div class="line">12</div><div class="line">13</div><div class="line">14</div><div class="line">15</div><div class="line">16</div></pre></td><td class="code"><pre><div class="line"> <span class="function"><span class="keyword">public</span> <span class="keyword">static</span> <span class="keyword">int</span> <span class="title">getStatusBarHeight</span><span class="params">(Context context)</span></span>&#123;</div><div class="line">    Class&lt;?&gt; c = <span class="keyword">null</span>;</div><div class="line">    Object obj = <span class="keyword">null</span>;</div><div class="line">    Field field = <span class="keyword">null</span>;</div><div class="line">    <span class="keyword">int</span> x = <span class="number">0</span>, statusBarHeight = <span class="number">0</span>;</div><div class="line">    <span class="keyword">try</span> &#123;</div><div class="line">        c = Class.forName(<span class="string">"com.android.internal.R$dimen"</span>);</div><div class="line">        obj = c.newInstance();</div><div class="line">        field = c.getField(<span class="string">"status_bar_height"</span>);</div><div class="line">        x = Integer.parseInt(field.get(obj).toString());</div><div class="line">        statusBarHeight = context.getResources().getDimensionPixelSize(x);</div><div class="line">    &#125; <span class="keyword">catch</span> (Exception e1) &#123;</div><div class="line">        e1.printStackTrace();</div><div class="line">    &#125;</div><div class="line">    <span class="keyword">return</span> statusBarHeight;</div><div class="line">&#125;</div></pre></td></tr></table></figure>
<h2 id="自定义属性步骤"><a href="#自定义属性步骤" class="headerlink" title="自定义属性步骤"></a>自定义属性步骤</h2><p>1.在res/values文件下定义</p>
<figure class="highlight xml"><table><tr><td class="gutter"><pre><div class="line">1</div><div class="line">2</div><div class="line">3</div></pre></td><td class="code"><pre><div class="line"><span class="tag">&lt;<span class="name">declare-styleable</span> <span class="attr">name</span>=<span class="string">"customView"</span>&gt;</span></div><div class="line">       <span class="tag">&lt;<span class="name">attr</span> <span class="attr">name</span>=<span class="string">"customtextSize"</span> <span class="attr">format</span>=<span class="string">"dimension"</span>/&gt;</span>//自定义属性,format属性表示该属性的单位</div><div class="line">   <span class="tag">&lt;/<span class="name">declare-styleable</span>&gt;</span></div></pre></td></tr></table></figure>
<p>2.在自定义View中获取</p>
<figure class="highlight java"><table><tr><td class="gutter"><pre><div class="line">1</div><div class="line">2</div><div class="line">3</div></pre></td><td class="code"><pre><div class="line">TypedArray typedArray = context.obtainStyledAttributes (attrs, R.styleable.customView);</div><div class="line"><span class="keyword">float</span> customtextSize = typedArray.getDimension (R.styleable.customView_customtextSize, <span class="number">18</span>);</div><div class="line">typedArray.recycle ();</div></pre></td></tr></table></figure>
<p>3.Layout中使用</p>
<p>记得加上命名空间:</p>
<figure class="highlight xml"><table><tr><td class="gutter"><pre><div class="line">1</div><div class="line">2</div><div class="line">3</div><div class="line">4</div><div class="line">5</div><div class="line">6</div></pre></td><td class="code"><pre><div class="line"><span class="tag">&lt;<span class="name">com.arrts.ArrtView</span></span></div><div class="line">	<span class="attr">xmlns:mio</span>=<span class="string">"http://schemas.android.com/apk/res-auto"</span></div><div class="line">       <span class="attr">android:layout_width</span>=<span class="string">"wrap_content"</span></div><div class="line">       <span class="attr">android:layout_height</span>=<span class="string">"wrap_content"</span></div><div class="line">       <span class="attr">mio:customtextSize</span>=<span class="string">"50sp"</span></div><div class="line">       /&gt;</div></pre></td></tr></table></figure>
<h2 id="Activity切换动画"><a href="#Activity切换动画" class="headerlink" title="Activity切换动画"></a>Activity切换动画</h2><p><code>overridePendingTransition(int enterAnim, int exitAnim)</code><br>第一个参数是:进入的Activity的动画<br>第二个参数是:当前要退出的Activity的动画</p>
<h2 id="自定义View获取子View的宽高"><a href="#自定义View获取子View的宽高" class="headerlink" title="自定义View获取子View的宽高"></a>自定义View获取子View的宽高</h2><figure class="highlight java"><table><tr><td class="gutter"><pre><div class="line">1</div><div class="line">2</div><div class="line">3</div><div class="line">4</div></pre></td><td class="code"><pre><div class="line"></div><div class="line">View child = getChildAt(<span class="number">0</span>);</div><div class="line">LayoutParams st = child.getLayoutParams ();</div><div class="line"><span class="comment">//st.width, st.height</span></div></pre></td></tr></table></figure>


                <hr>

                

                <ul class="pager">
                    
                        <li class="previous">
                            <a href="/2014/12/19/一步步撸出图片加载框架ImageLoader /" data-toggle="tooltip" data-placement="top" title="一步步撸出图片加载框架">&larr; Previous Post</a>
                        </li>
                    
                    
                        <li class="next">
                            <a href="/2014/11/29/navigation_drawer/" data-toggle="tooltip" data-placement="top" title="Navigation Drawer 打造MD侧边栏">Next Post &rarr;</a>
                        </li>
                    
                </ul>

                

                
                <!-- disqus 评论框 start -->
                <div class="comment">
                    <div id="disqus_thread" class="disqus-thread"></div>
                </div>
                <!-- disqus 评论框 end -->
                

            </div>
    <!-- Side Catalog Container -->
        
            <div class="
                col-lg-2 col-lg-offset-0
                visible-lg-block
                sidebar-container
                catalog-container">
                <div class="side-catalog">
                    <hr class="hidden-sm hidden-xs">
                    <h5>
                        <a class="catalog-toggle" href="#">CATALOG</a>
                    </h5>
                    <ul class="catalog-body"></ul>
                </div>
            </div>
        

    <!-- Sidebar Container -->

            <div class="
                col-lg-8 col-lg-offset-2
                col-md-10 col-md-offset-1
                sidebar-container">

                <!-- Featured Tags -->
                
                <section>
                    <!-- no hr -->
                    <h5><a href="/tags/">FEATURED TAGS</a></h5>
                    <div class="tags">
                       
                          <a class="tag" href="/tags/#WIKI" title="WIKI">WIKI</a>
                        
                    </div>
                </section>
                

                <!-- Friends Blog -->
                
                <hr>
                <h5>FRIENDS</h5>
                <ul class="list-inline">

                    
                        <li><a href="http://lrd.ele.me/" target="_blank">lrd ele&#39;s Blog</a></li>
                    
                </ul>
                
            </div>

        </div>
    </div>
</article>




<!-- disqus 公共JS代码 start (一个网页只需插入一次) -->
<script type="text/javascript">
    /* * * CONFIGURATION VARIABLES * * */
    var disqus_shortname = "hexo-theme-huxblog";
    var disqus_identifier = "http://mio4kon.com/2014/12/01/Wiki/";
    var disqus_url = "http://mio4kon.com/2014/12/01/Wiki/";

    (function() {
        var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true;
        dsq.src = '//' + disqus_shortname + '.disqus.com/embed.js';
        (document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
    })();
</script>
<!-- disqus 公共JS代码 end -->




<!-- async load function -->
<script>
    function async(u, c) {
      var d = document, t = 'script',
          o = d.createElement(t),
          s = d.getElementsByTagName(t)[0];
      o.src = u;
      if (c) { o.addEventListener('load', function (e) { c(null, e); }, false); }
      s.parentNode.insertBefore(o, s);
    }
</script>
<!-- anchor-js, Doc:http://bryanbraun.github.io/anchorjs/ -->
<script>
    async("https://cdn.bootcss.com/anchor-js/1.1.1/anchor.min.js",function(){
        anchors.options = {
          visible: 'always',
          placement: 'right',
          icon: '#'
        };
        anchors.add().remove('.intro-header h1').remove('.subheading').remove('.sidebar-container h5');
    })
</script>
<style>
    /* place left on bigger screen */
    @media all and (min-width: 800px) {
        .anchorjs-link{
            position: absolute;
            left: -0.75em;
            font-size: 1.1em;
            margin-top : -0.1em;
        }
    }
</style>



    <!-- Footer -->
    <!-- Footer -->
<footer>
    <div class="container">
        <div class="row">
            <div class="col-lg-8 col-lg-offset-2 col-md-10 col-md-offset-1">
                <ul class="list-inline text-center">
                
                
                

                
                    <li>
                        <a target="_blank" href="http://weibo.com/u/3198010790">
                            <span class="fa-stack fa-lg">
                                <i class="fa fa-circle fa-stack-2x"></i>
                                <i class="fa fa-weibo fa-stack-1x fa-inverse"></i>
                            </span>
                        </a>
                    </li>
                

                

                
                    <li>
                        <a target="_blank"  href="https://github.com/Mio4kon">
                            <span class="fa-stack fa-lg">
                                <i class="fa fa-circle fa-stack-2x"></i>
                                <i class="fa fa-github fa-stack-1x fa-inverse"></i>
                            </span>
                        </a>
                    </li>
                

                

                </ul>
                <p class="copyright text-muted">
                    Copyright &copy; Mio4kon 2019 
                    <br>
                    Theme by <a href="http://huangxuan.me">Hux</a> 
                    <span style="display: inline-block; margin: 0 5px;">
                        <i class="fa fa-heart"></i>
                    </span> 
                    Ported by <a href="http://blog.kaijun.rocks">Kaijun</a> | 
                    <iframe
                        style="margin-left: 2px; margin-bottom:-5px;"
                        frameborder="0" scrolling="0" width="91px" height="20px"
                        src="https://ghbtns.com/github-btn.html?user=kaijun&repo=hexo-theme-huxblog&type=star&count=true" >
                    </iframe>
                </p>
            </div>
        </div>
    </div>
</footer>

<!-- jQuery -->
<script src="/js/jquery.min.js"></script>

<!-- Bootstrap Core JavaScript -->
<script src="/js/bootstrap.min.js"></script>

<!-- Custom Theme JavaScript -->
<script src="/js/hux-blog.min.js"></script>


<!-- async load function -->
<script>
    function async(u, c) {
      var d = document, t = 'script',
          o = d.createElement(t),
          s = d.getElementsByTagName(t)[0];
      o.src = u;
      if (c) { o.addEventListener('load', function (e) { c(null, e); }, false); }
      s.parentNode.insertBefore(o, s);
    }
</script>

<!-- 
     Because of the native support for backtick-style fenced code blocks 
     right within the Markdown is landed in Github Pages, 
     From V1.6, There is no need for Highlight.js, 
     so Huxblog drops it officially.

     - https://github.com/blog/2100-github-pages-now-faster-and-simpler-with-jekyll-3-0  
     - https://help.github.com/articles/creating-and-highlighting-code-blocks/    
-->
<!--
    <script>
        async("http://cdn.bootcss.com/highlight.js/8.6/highlight.min.js", function(){
            hljs.initHighlightingOnLoad();
        })
    </script>
    <link href="http://cdn.bootcss.com/highlight.js/8.6/styles/github.min.css" rel="stylesheet">
-->


<!-- jquery.tagcloud.js -->
<script>
    // only load tagcloud.js in tag.html
    if($('#tag_cloud').length !== 0){
        async("http://mio4kon.com/js/jquery.tagcloud.js",function(){
            $.fn.tagcloud.defaults = {
                //size: {start: 1, end: 1, unit: 'em'},
                color: {start: '#bbbbee', end: '#0085a1'},
            };
            $('#tag_cloud a').tagcloud();
        })
    }
</script>

<!--fastClick.js -->
<script>
    async("https://cdn.bootcss.com/fastclick/1.0.6/fastclick.min.js", function(){
        var $nav = document.querySelector("nav");
        if($nav) FastClick.attach($nav);
    })
</script>


<!-- Google Analytics -->




<!-- Baidu Tongji -->


<!-- Side Catalog -->

<script type="text/javascript">
    function generateCatalog (selector) {
        var P = $('div.post-container'),a,n,t,l,i,c;
        a = P.find('h1,h2,h3,h4,h5,h6');
        a.each(function () {
            n = $(this).prop('tagName').toLowerCase();
            i = "#"+$(this).prop('id');
            t = $(this).text();
            c = $('<a href="'+i+'" rel="nofollow">'+t+'</a>');
            l = $('<li class="'+n+'_nav"></li>').append(c);
            $(selector).append(l);
        });
        return true;    
    }

    generateCatalog(".catalog-body");

    // toggle side catalog
    $(".catalog-toggle").click((function(e){
        e.preventDefault();
        $('.side-catalog').toggleClass("fold")
    }))

    /*
     * Doc: https://github.com/davist11/jQuery-One-Page-Nav
     * Fork by Hux to support padding
     */
    async("/js/jquery.nav.js", function () {
        $('.catalog-body').onePageNav({
            currentClass: "active",
            changeHash: !1,
            easing: "swing",
            filter: "",
            scrollSpeed: 700,
            scrollOffset: 0,
            scrollThreshold: .2,
            begin: null,
            end: null,
            scrollChange: null,
            padding: 80
        });
    });
</script>





<!-- Image to hack wechat -->
<img src="http://mio4kon.com/img/icon_wechat.png" width="0" height="0" />
<!-- Migrate from head to bottom, no longer block render and still work -->

</body>

</html>
